Subj: TextEdit and rTextForLETextBox2 91-03-01 21:01:05 EST
From: PatrickC19
Posted on: America Online
I'm having quite a struggle trying to get "rTextForLETextBox2" text into my TextEdit control! PStrings and CStrings show up just fine and I use the same "rTextForLETextBox2" string in a *dialog* and it shows up! It just won't show up in my TextEdit control! I'm stumped!
I'm creating a window via "NewWindow2() that has one TE Control in it. I pull the TE handle with "GetCtlHandleFromID()", and then I call "TEInsert()" to load the text in the window. The text, in LETextBox2 format, is a resource too!
After playing with it, I noticed that I could get some text to appear *if* I passed a TEXT LENGTH along with the TEInsert() call. Even though Vol 3 say's that the length param will be ignored!
I looked at my TYPES.REZ file and it has "rTextForLETextBox2" defined as { string; }; Is that right? Isn't the length word be missing?
As I said - I'm stumped and will take any help I can get!
Thanks - Patrick
Path: IIGS Toolbox/TextEdit and LETextBox2
Subj: TE n stuff 91-03-01 21:04:27 EST
From: Damien9
Posted on: America Online
Patrick,
I seem to recall seeing a technote or a posting about some incompatilities between text for LETextBoxes and Text Edit. If I come across it again, I'll post it, but if anyone else has it, maybe they'll post
Jeff
Path: IIGS Toolbox/TextEdit and LETextBox2
Subj: A Workaround... 91-03-02 14:45:34 EST
From: PatrickC19
Posted on: America Online
It works as advertised -- IF -- I pass in the length of the LETextBox2 stuff. Weird...
Scanned TechNote #92, and didn't see anything applicable to my problem. I'm still wondering if my TYPES.REZ file is a tad off.
Patrick
Path: IIGS Toolbox/TextEdit and LETextBox2
Subj: LETextBox2 91-03-03 01:17:29 EST
From: ShanoJ
Posted on: America Online
Ya, there are incompatibilities between LETextBox2 text and TE. You have to pass a length to TESetText, but it still isn't guaranteed... :( The best way to do it is to pass the text as a text block, and then the style information in a style block (which is, I assume, why you were trying to use an LETextBox2 parameter).
Hope this helps.
Jonah
Path: IIGS Toolbox/TextEdit and LETextBox2
Subj: LETextBox2 91-03-08 22:10:52 EST
From: Matt DTS
Posted on: America Online
You can't TEGetText more than 4K worth of text in LETextBox2 format - that's what's in the Technical Notes.
You should be able to TESetText with LETextBox2 without too many problems, but it's better to use something like WordWorks or My Word! or another program that creates Teach files to just get the stuff in a format you can pass directly to TextEdit as a TEFormat resource (or rStyleBlock - $8012 - same thing).
And, of course, you always have to pass the length of text if your text reference is a *pointer*, but you shouldn't have to if it's a resource.
--Matt
Path: IIGS Toolbox/TextEdit and LETextBox2
Subj: Matt... 91-03-10 13:57:36 EST
From: ShanoJ
Posted on: America Online
I found with a program that I was working on that whenever you call TESetText with the text reference in LETextBox2 format, you HAVE to pass the length of the text... Try it with NiftyList and you'll see... :(
Jonah
Path: IIGS Toolbox/TextEdit and LETextBox2
Subj: Matt, me too 91-03-11 19:40:15 EST
From: PatrickC19
Posted on: America Online
Matt,
It's *probable* that I'm using TEInsert() *and* TESetText incorrectly -- but I too had to pass in the length of the LETB2 string -- even if it's a resource.
When I was using TESetText(), I wasn't using (nor had I set up) any special style or format options. I just used whatever defaults came along with my "NewControl2()" call.
Patrick
Problems with putting "rTextForLETextBox2" information into a TextEdit control